package com.gy.leetcode;

public class 找到最高海拔 {
    public int largestAltitude(int[] gain) {

        int max=0;
        int hb=0;
        for (int i : gain) {
            hb+=i;
            max=Math.max(hb,max);
        }

        return max;
    }
}
